"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
var app = getApp();
exports.default = Page({
  data: {},
  onLoad: function onLoad() {
    var _this = this;
    var openid = wx.getStorageSync("openid");
    wx.request({
      url: app.globalData.host,
      data: {
        mod: "do",
        act: "contact",
        ssid: openid
      },
      method: "post", // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
      header: {
        "Content-Type": "application/x-www-form-urlencoded"
      },
      success: function success(res) {
        // success
        //console.log(res)
        _this.setData({
          openid: openid,
          contact: res.data.info
        });
      },
      fail: function fail() {
        // fail
      },
      complete: function complete() {
        // complete
      }
    });
  },
  call: function call() {
    wx.makePhoneCall({
      phoneNumber: '13381012744'
    })
  },
  customerService: function customerService() {
    var _this = this;
    _this.setData({
      isShowContact: true
    });
  },
  close: function close() {
    var _this = this;
    _this.setData({
      isShowContact: false
    });
  },
  linkHelp: function linkHelp() {
    wx.navigateTo({
      url: "help/help",
      success: function success(res) {
        // success
      }
    });
  },
  linkAbout: function linkAbout() {
    wx.navigateTo({
      url: "about/about",
      success: function success(res) {
        // success
      }
    });
  },
  in: function _in() { }
});